package cn.lzx.log;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.util.Map;

/**
 * Created by lizhenxing on 2017/8/2.
 */
@Data
public class L {
    private String appkey;
    private String clientAppkey;
    private String clientIp;
    private String clazzName;
    private String methodName;
    private String request;
    private String response;
    private String beginTime;
    private String time;


    public static L createLog(){
        return new L();
    }


    @SuppressWarnings("unchecked")
    public Map<String,String> toMap(){
        return (Map<String, String>) new ObjectMapper().convertValue(this,Map.class);
    }
}